/*
 * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION!

import { int32, int64, float32 } from "@koalaui/common"
import { KInt, KPointer, KBoolean, KStringPtr, wrapCallback, NativeBuffer } from "@koalaui/interop"
import { NodeAttach, remember } from "@koalaui/runtime"
import { Length, ResourceColor, LengthConstrain, Dimension } from "./ArkUnitsInterfaces"
import { Callback_Void, Callback_Number_Number_Void, Callback_Number_Number_Number_Void, Callback_Number_Boolean, Callback_Number_Number_Boolean, Callback_ItemDragInfo_Number_CustomBuilder, Callback_ItemDragInfo_Void, Callback_ItemDragInfo_Number_Number_Void, Callback_ItemDragInfo_Number_Void, Callback_ItemDragInfo_Number_Number_Boolean_Void, Callback_Number_ScrollState_Literal_Number_offsetRemain, Literal_Number_offsetRemain } from "./SyntheticDeclarations"
import { Scroller } from "./ArkScrollerMaterialized"
import { ScrollableCommonMethod, NestedScrollOptions, ItemDragInfo, CustomBuilder, EdgeEffectOptions } from "./ArkCommonInterfaces"
import { Axis, BarState, EdgeEffect } from "./ArkEnumsInterfaces"
import { Resource } from "./ArkResourceInterfaces"
import { ChildrenMainSize } from "./ArkChildrenMainSizeMaterialized"
export enum ScrollState {
    IDLE = 0,
    Idle = 0,
    SCROLL = 1,
    Scroll = 1,
    FLING = 2,
    Fling = 2
}
export enum ListItemAlign {
    START = 0,
    Start = 0,
    CENTER = 1,
    Center = 1,
    END = 2,
    End = 2
}
export enum ListItemGroupArea {
    NONE = 0,
    IN_LIST_ITEM_AREA = 1,
    IN_HEADER_AREA = 2,
    IN_FOOTER_AREA = 3
}
export enum StickyStyle {
    NONE = 0,
    None = 0,
    HEADER = 1,
    Header = 1,
    FOOTER = 2,
    Footer = 2
}
export enum ChainEdgeEffect {
    DEFAULT = 0,
    STRETCH = 1
}
export enum ScrollSnapAlign {
    NONE = 0,
    START = 1,
    CENTER = 2,
    END = 3
}
export interface ChainAnimationOptions {
    minSpace: Length;
    maxSpace: Length;
    conductivity?: number;
    intensity?: number;
    edgeEffect?: ChainEdgeEffect;
    stiffness?: number;
    damping?: number;
}
export interface CloseSwipeActionOptions {
    onFinish?: (() => void);
}
export interface VisibleListContentInfo {
    index: number;
    itemGroupArea?: ListItemGroupArea;
    itemIndexInGroup?: number;
}
export type OnScrollVisibleContentChangeCallback = (start: VisibleListContentInfo, end: VisibleListContentInfo) => void;
export interface ListOptions {
    initialIndex?: number;
    space?: number | string;
    scroller?: Scroller;
}
export type ListInterface = (options?: ListOptions) => ListAttribute;
export interface ListDividerOptions {
    strokeWidth: Length;
    color?: ResourceColor;
    startMargin?: Length;
    endMargin?: Length;
}
export interface ListAttribute extends ScrollableCommonMethod<ListAttribute> {
    alignListItem: ListItemAlign;
    listDirection: Axis;
    scrollBar: BarState;
    contentStartOffset: number;
    contentEndOffset: number;
    divider: ListDividerOptions | undefined;
    editMode: boolean;
    multiSelectable: boolean;
    cachedCount: number;
    chainAnimation: boolean;
    chainAnimationOptions: ChainAnimationOptions;
    sticky: StickyStyle;
    scrollSnapAlign: ScrollSnapAlign;
    nestedScroll: NestedScrollOptions;
    enableScrollInteraction: boolean;
    friction: number | Resource;
    childrenMainSize: ChildrenMainSize;
    maintainVisibleContentPosition: boolean;
    onScroll: ((first: number,last: number) => void);
    onScrollIndex: ((start: number,end: number,center: number) => void);
    onScrollVisibleContentChange: OnScrollVisibleContentChangeCallback;
    onReachStart: (() => void);
    onReachEnd: (() => void);
    onScrollStart: (() => void);
    onScrollStop: (() => void);
    onItemDelete: ((index: number) => boolean);
    onItemMove: ((from: number,to: number) => boolean);
    onItemDragStart: ((event: ItemDragInfo,itemIndex: number) => CustomBuilder);
    onItemDragEnter: ((event: ItemDragInfo) => void);
    onItemDragMove: ((event: ItemDragInfo,itemIndex: number,insertIndex: number) => void);
    onItemDragLeave: ((event: ItemDragInfo,itemIndex: number) => void);
    onItemDrop: ((event: ItemDragInfo,itemIndex: number,insertIndex: number,isSuccess: boolean) => void);
    onScrollFrameBegin: ((offset: number,state: ScrollState) => Literal_Number_offsetRemain);

}
